import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { NzTreeModule } from 'ng-zorro-antd';
import { QYAddComponent } from './add/add';
import { QYEditComponent } from './edit/edit';
import { QYListComponent } from './list/list';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'list',
			},
			{
				path: 'list',
				component: QYListComponent,
				data: {
					title: '企业管理',
					url: 'qy/list',
				},
			},
			{
				path: 'add',
				component: QYAddComponent,
				data: {
					title: '企业新增',
					url: 'qy/add',
				},
			},
			{
				path: 'edit',
				component: QYEditComponent,
				data: {
					title: '企业修改',
					url: 'qy/edit',
				},
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes),NzTreeModule],
	exports: [RouterModule],
})
export class QYRoutingModule {}
